package cn.tedu._05mvcboot04.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 发布文章DTO类
 */
@Data
public class ArticleDTO {
    @ApiModelProperty(value = "文章标题", required = true)
    @NotBlank(message = "文章标题不得为空")
    @Size(min = 1,max = 20,message = "文章标题长度应为1-20")
    private String title;
    @ApiModelProperty(value = "文章内容", required = true)
    @NotBlank(message = "文章内容不得为空")
    @Size(min = 10,max = 500,message = "文章内容长度应为10-500")
    private String content;
}
